import { createRouter, createWebHistory } from "vue-router";

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/",
      redirect: "/login",
    },

    {
      path: "/login",
      name: "login",
      component: () => import("../views/Login.vue"),
      meta: {
        keepAlive: false,
      },
    },
    {
      path: "/home",
      name: "home",
      component: () => import("@/views/Home.vue"),
      redirect: "/home/notice",
      children: [
        
        {
          path: "/home/inBound",
          component: () => import("@/views/InBound.vue"),
        },
        { path: "/home/outBound", component: () => import("@/views/OutBound.vue") },
        { path: "/home/storage", component: () => import("@/views/Storage.vue") },
        { path: "/home/notice", component: () => import("@/views/Notice.vue") },
        { path: "/home/car", component: () => import("@/views/Car.vue") },
      ],
    },
  ],
});

export default router;
